package stars.enums;

import java.util.ArrayList;
import java.util.Random;

public class StarSystemNames {
	
	private ArrayList<String> entries = new ArrayList<String>();
	private ArrayList<String> remaining = new ArrayList<String>();
	Random rand = new Random();
	
	public ArrayList<String> getEntries() {
		return this.entries;
	}
	
	public void setEntries(ArrayList<String> entries) {
		this.entries.clear();
		this.entries.addAll(entries);
		this.remaining.clear();
		this.remaining.addAll(entries);
	}
	
	public String getRandomEntry() {
		int size = remaining.size(); //QQQ What if size is down to 0?		
		int index = rand.nextInt(size);
		
		String chosen = remaining.get(index);		
		remaining.remove(index);		
		return chosen;
	}
	
	
	

}
